//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS ECR service.
///
/// Amazon Elastic Container Registry Amazon Elastic Container Registry (Amazon ECR) is a managed container image registry service. Customers can use the familiar Docker CLI, or their preferred client, to push, pull, and manage images. Amazon ECR provides a secure, scalable, and reliable registry for your Docker or Open Container Initiative (OCI) images. Amazon ECR supports private repositories with resource-based permissions using IAM so that specific users or Amazon EC2 instances can access repositories and images. Amazon ECR has service endpoints in each supported Region. For more information, see Amazon ECR endpoints in the Amazon Web Services General Reference.
public struct ECR: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the ECR client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            amzTarget: "AmazonEC2ContainerRegistry_V20150921",
            serviceName: "ECR",
            serviceIdentifier: "api.ecr",
            signingName: "ecr",
            serviceProtocol: .json(version: "1.1"),
            apiVersion: "2015-09-21",
            endpoint: endpoint,
            serviceEndpoints: Self.serviceEndpoints,
            variantEndpoints: Self.variantEndpoints,
            errorType: ECRErrorType.self,
            xmlNamespace: "http://ecr.amazonaws.com/doc/2015-09-21/",
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }


    /// custom endpoints for regions
    static var serviceEndpoints: [String: String] {[
        "af-south-1": "api.ecr.af-south-1.amazonaws.com",
        "ap-east-1": "api.ecr.ap-east-1.amazonaws.com",
        "ap-northeast-1": "api.ecr.ap-northeast-1.amazonaws.com",
        "ap-northeast-2": "api.ecr.ap-northeast-2.amazonaws.com",
        "ap-northeast-3": "api.ecr.ap-northeast-3.amazonaws.com",
        "ap-south-1": "api.ecr.ap-south-1.amazonaws.com",
        "ap-south-2": "api.ecr.ap-south-2.amazonaws.com",
        "ap-southeast-1": "api.ecr.ap-southeast-1.amazonaws.com",
        "ap-southeast-2": "api.ecr.ap-southeast-2.amazonaws.com",
        "ap-southeast-3": "api.ecr.ap-southeast-3.amazonaws.com",
        "ap-southeast-4": "api.ecr.ap-southeast-4.amazonaws.com",
        "ap-southeast-5": "api.ecr.ap-southeast-5.amazonaws.com",
        "ap-southeast-7": "api.ecr.ap-southeast-7.amazonaws.com",
        "ca-central-1": "api.ecr.ca-central-1.amazonaws.com",
        "ca-west-1": "api.ecr.ca-west-1.amazonaws.com",
        "cn-north-1": "api.ecr.cn-north-1.amazonaws.com.cn",
        "cn-northwest-1": "api.ecr.cn-northwest-1.amazonaws.com.cn",
        "eu-central-1": "api.ecr.eu-central-1.amazonaws.com",
        "eu-central-2": "api.ecr.eu-central-2.amazonaws.com",
        "eu-isoe-west-1": "api.ecr.eu-isoe-west-1.cloud.adc-e.uk",
        "eu-north-1": "api.ecr.eu-north-1.amazonaws.com",
        "eu-south-1": "api.ecr.eu-south-1.amazonaws.com",
        "eu-south-2": "api.ecr.eu-south-2.amazonaws.com",
        "eu-west-1": "api.ecr.eu-west-1.amazonaws.com",
        "eu-west-2": "api.ecr.eu-west-2.amazonaws.com",
        "eu-west-3": "api.ecr.eu-west-3.amazonaws.com",
        "il-central-1": "api.ecr.il-central-1.amazonaws.com",
        "me-central-1": "api.ecr.me-central-1.amazonaws.com",
        "me-south-1": "api.ecr.me-south-1.amazonaws.com",
        "mx-central-1": "api.ecr.mx-central-1.amazonaws.com",
        "sa-east-1": "api.ecr.sa-east-1.amazonaws.com",
        "us-east-1": "api.ecr.us-east-1.amazonaws.com",
        "us-east-2": "api.ecr.us-east-2.amazonaws.com",
        "us-gov-east-1": "api.ecr.us-gov-east-1.amazonaws.com",
        "us-gov-west-1": "api.ecr.us-gov-west-1.amazonaws.com",
        "us-iso-east-1": "api.ecr.us-iso-east-1.c2s.ic.gov",
        "us-iso-west-1": "api.ecr.us-iso-west-1.c2s.ic.gov",
        "us-isob-east-1": "api.ecr.us-isob-east-1.sc2s.sgov.gov",
        "us-isof-east-1": "api.ecr.us-isof-east-1.csp.hci.ic.gov",
        "us-isof-south-1": "api.ecr.us-isof-south-1.csp.hci.ic.gov",
        "us-west-1": "api.ecr.us-west-1.amazonaws.com",
        "us-west-2": "api.ecr.us-west-2.amazonaws.com"
    ]}


    /// FIPS and dualstack endpoints
    static var variantEndpoints: [EndpointVariantType: AWSServiceConfig.EndpointVariant] {[
        [.dualstack]: .init(endpoints: [
            "af-south-1": "ecr.af-south-1.api.aws",
            "ap-east-1": "ecr.ap-east-1.api.aws",
            "ap-northeast-1": "ecr.ap-northeast-1.api.aws",
            "ap-northeast-2": "ecr.ap-northeast-2.api.aws",
            "ap-northeast-3": "ecr.ap-northeast-3.api.aws",
            "ap-south-1": "ecr.ap-south-1.api.aws",
            "ap-south-2": "ecr.ap-south-2.api.aws",
            "ap-southeast-1": "ecr.ap-southeast-1.api.aws",
            "ap-southeast-2": "ecr.ap-southeast-2.api.aws",
            "ap-southeast-3": "ecr.ap-southeast-3.api.aws",
            "ap-southeast-4": "ecr.ap-southeast-4.api.aws",
            "ap-southeast-5": "ecr.ap-southeast-5.api.aws",
            "ap-southeast-7": "ecr.ap-southeast-7.api.aws",
            "ca-central-1": "ecr.ca-central-1.api.aws",
            "ca-west-1": "ecr.ca-west-1.api.aws",
            "cn-north-1": "ecr.cn-north-1.api.amazonwebservices.com.cn",
            "cn-northwest-1": "ecr.cn-northwest-1.api.amazonwebservices.com.cn",
            "eu-central-1": "ecr.eu-central-1.api.aws",
            "eu-central-2": "ecr.eu-central-2.api.aws",
            "eu-north-1": "ecr.eu-north-1.api.aws",
            "eu-south-1": "ecr.eu-south-1.api.aws",
            "eu-south-2": "ecr.eu-south-2.api.aws",
            "eu-west-1": "ecr.eu-west-1.api.aws",
            "eu-west-2": "ecr.eu-west-2.api.aws",
            "eu-west-3": "ecr.eu-west-3.api.aws",
            "il-central-1": "ecr.il-central-1.api.aws",
            "me-central-1": "ecr.me-central-1.api.aws",
            "me-south-1": "ecr.me-south-1.api.aws",
            "mx-central-1": "ecr.mx-central-1.api.aws",
            "sa-east-1": "ecr.sa-east-1.api.aws",
            "us-east-1": "ecr.us-east-1.api.aws",
            "us-east-2": "ecr.us-east-2.api.aws",
            "us-gov-east-1": "ecr.us-gov-east-1.api.aws",
            "us-gov-west-1": "ecr.us-gov-west-1.api.aws",
            "us-west-1": "ecr.us-west-1.api.aws",
            "us-west-2": "ecr.us-west-2.api.aws"
        ]),
        [.dualstack, .fips]: .init(endpoints: [
            "us-east-1": "ecr-fips.us-east-1.api.aws",
            "us-east-2": "ecr-fips.us-east-2.api.aws",
            "us-gov-east-1": "ecr-fips.us-gov-east-1.api.aws",
            "us-gov-west-1": "ecr-fips.us-gov-west-1.api.aws",
            "us-west-1": "ecr-fips.us-west-1.api.aws",
            "us-west-2": "ecr-fips.us-west-2.api.aws"
        ]),
        [.fips]: .init(endpoints: [
            "ap-east-2": "ecr-fips.ap-east-2.amazonaws.com",
            "us-east-1": "ecr-fips.us-east-1.amazonaws.com",
            "us-east-2": "ecr-fips.us-east-2.amazonaws.com",
            "us-gov-east-1": "ecr-fips.us-gov-east-1.amazonaws.com",
            "us-gov-west-1": "ecr-fips.us-gov-west-1.amazonaws.com",
            "us-west-1": "ecr-fips.us-west-1.amazonaws.com",
            "us-west-2": "ecr-fips.us-west-2.amazonaws.com"
        ])
    ]}

    // MARK: API Calls

    /// Checks the availability of one or more image layers in a repository. When an image is pushed to a repository, each image layer is checked to verify if it has been uploaded before. If it has been uploaded, then the image layer is skipped.  This operation is used by the Amazon ECR proxy and is not generally used by customers for pulling and pushing images. In most cases, you should use the docker CLI to pull, tag, and push images.
    @Sendable
    @inlinable
    public func batchCheckLayerAvailability(_ input: BatchCheckLayerAvailabilityRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> BatchCheckLayerAvailabilityResponse {
        try await self.client.execute(
            operation: "BatchCheckLayerAvailability", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Checks the availability of one or more image layers in a repository. When an image is pushed to a repository, each image layer is checked to verify if it has been uploaded before. If it has been uploaded, then the image layer is skipped.  This operation is used by the Amazon ECR proxy and is not generally used by customers for pulling and pushing images. In most cases, you should use the docker CLI to pull, tag, and push images.
    ///
    /// Parameters:
    ///   - layerDigests: The digests of the image layers to check.
    ///   - registryId: The Amazon Web Services account ID associated with the registry that contains the image layers to check. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryName: The name of the repository that is associated with the image layers to check.
    ///   - logger: Logger use during operation
    @inlinable
    public func batchCheckLayerAvailability(
        layerDigests: [String],
        registryId: String? = nil,
        repositoryName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> BatchCheckLayerAvailabilityResponse {
        let input = BatchCheckLayerAvailabilityRequest(
            layerDigests: layerDigests, 
            registryId: registryId, 
            repositoryName: repositoryName
        )
        return try await self.batchCheckLayerAvailability(input, logger: logger)
    }

    /// Deletes a list of specified images within a repository. Images are specified with either an imageTag or imageDigest. You can remove a tag from an image by specifying the image's tag in your request. When you remove the last tag from an image, the image is deleted from your repository. You can completely delete an image (and all of its tags) by specifying the image's digest in your request.
    @Sendable
    @inlinable
    public func batchDeleteImage(_ input: BatchDeleteImageRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> BatchDeleteImageResponse {
        try await self.client.execute(
            operation: "BatchDeleteImage", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a list of specified images within a repository. Images are specified with either an imageTag or imageDigest. You can remove a tag from an image by specifying the image's tag in your request. When you remove the last tag from an image, the image is deleted from your repository. You can completely delete an image (and all of its tags) by specifying the image's digest in your request.
    ///
    /// Parameters:
    ///   - imageIds: A list of image ID references that correspond to images to delete. The format of the imageIds reference is imageTag=tag or imageDigest=digest.
    ///   - registryId: The Amazon Web Services account ID associated with the registry that contains the image to delete. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryName: The repository that contains the image to delete.
    ///   - logger: Logger use during operation
    @inlinable
    public func batchDeleteImage(
        imageIds: [ImageIdentifier],
        registryId: String? = nil,
        repositoryName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> BatchDeleteImageResponse {
        let input = BatchDeleteImageRequest(
            imageIds: imageIds, 
            registryId: registryId, 
            repositoryName: repositoryName
        )
        return try await self.batchDeleteImage(input, logger: logger)
    }

    /// Gets detailed information for an image. Images are specified with either an imageTag or imageDigest. When an image is pulled, the BatchGetImage API is called once to retrieve the image manifest.
    @Sendable
    @inlinable
    public func batchGetImage(_ input: BatchGetImageRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> BatchGetImageResponse {
        try await self.client.execute(
            operation: "BatchGetImage", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets detailed information for an image. Images are specified with either an imageTag or imageDigest. When an image is pulled, the BatchGetImage API is called once to retrieve the image manifest.
    ///
    /// Parameters:
    ///   - acceptedMediaTypes: The accepted media types for the request. Valid values: application/vnd.docker.distribution.manifest.v1+json | application/vnd.docker.distribution.manifest.v2+json | application/vnd.oci.image.manifest.v1+json
    ///   - imageIds: A list of image ID references that correspond to images to describe. The format of the imageIds reference is imageTag=tag or imageDigest=digest.
    ///   - registryId: The Amazon Web Services account ID associated with the registry that contains the images to describe. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryName: The repository that contains the images to describe.
    ///   - logger: Logger use during operation
    @inlinable
    public func batchGetImage(
        acceptedMediaTypes: [String]? = nil,
        imageIds: [ImageIdentifier],
        registryId: String? = nil,
        repositoryName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> BatchGetImageResponse {
        let input = BatchGetImageRequest(
            acceptedMediaTypes: acceptedMediaTypes, 
            imageIds: imageIds, 
            registryId: registryId, 
            repositoryName: repositoryName
        )
        return try await self.batchGetImage(input, logger: logger)
    }

    /// Gets the scanning configuration for one or more repositories.
    @Sendable
    @inlinable
    public func batchGetRepositoryScanningConfiguration(_ input: BatchGetRepositoryScanningConfigurationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> BatchGetRepositoryScanningConfigurationResponse {
        try await self.client.execute(
            operation: "BatchGetRepositoryScanningConfiguration", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets the scanning configuration for one or more repositories.
    ///
    /// Parameters:
    ///   - repositoryNames: One or more repository names to get the scanning configuration for.
    ///   - logger: Logger use during operation
    @inlinable
    public func batchGetRepositoryScanningConfiguration(
        repositoryNames: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> BatchGetRepositoryScanningConfigurationResponse {
        let input = BatchGetRepositoryScanningConfigurationRequest(
            repositoryNames: repositoryNames
        )
        return try await self.batchGetRepositoryScanningConfiguration(input, logger: logger)
    }

    /// Informs Amazon ECR that the image layer upload has completed for a specified registry, repository name, and upload ID. You can optionally provide a sha256 digest of the image layer for data validation purposes. When an image is pushed, the CompleteLayerUpload API is called once per each new image layer to verify that the upload has completed.  This operation is used by the Amazon ECR proxy and is not generally used by customers for pulling and pushing images. In most cases, you should use the docker CLI to pull, tag, and push images.
    @Sendable
    @inlinable
    public func completeLayerUpload(_ input: CompleteLayerUploadRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CompleteLayerUploadResponse {
        try await self.client.execute(
            operation: "CompleteLayerUpload", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Informs Amazon ECR that the image layer upload has completed for a specified registry, repository name, and upload ID. You can optionally provide a sha256 digest of the image layer for data validation purposes. When an image is pushed, the CompleteLayerUpload API is called once per each new image layer to verify that the upload has completed.  This operation is used by the Amazon ECR proxy and is not generally used by customers for pulling and pushing images. In most cases, you should use the docker CLI to pull, tag, and push images.
    ///
    /// Parameters:
    ///   - layerDigests: The sha256 digest of the image layer.
    ///   - registryId: The Amazon Web Services account ID associated with the registry to which to upload layers. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryName: The name of the repository to associate with the image layer.
    ///   - uploadId: The upload ID from a previous InitiateLayerUpload operation to associate with the image layer.
    ///   - logger: Logger use during operation
    @inlinable
    public func completeLayerUpload(
        layerDigests: [String],
        registryId: String? = nil,
        repositoryName: String,
        uploadId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CompleteLayerUploadResponse {
        let input = CompleteLayerUploadRequest(
            layerDigests: layerDigests, 
            registryId: registryId, 
            repositoryName: repositoryName, 
            uploadId: uploadId
        )
        return try await self.completeLayerUpload(input, logger: logger)
    }

    /// Creates a pull through cache rule. A pull through cache rule provides a way to cache images from an upstream registry source in your Amazon ECR private registry. For more information, see Using pull through cache rules in the Amazon Elastic Container Registry User Guide.
    @Sendable
    @inlinable
    public func createPullThroughCacheRule(_ input: CreatePullThroughCacheRuleRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreatePullThroughCacheRuleResponse {
        try await self.client.execute(
            operation: "CreatePullThroughCacheRule", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a pull through cache rule. A pull through cache rule provides a way to cache images from an upstream registry source in your Amazon ECR private registry. For more information, see Using pull through cache rules in the Amazon Elastic Container Registry User Guide.
    ///
    /// Parameters:
    ///   - credentialArn: The Amazon Resource Name (ARN) of the Amazon Web Services Secrets Manager secret that identifies the credentials to authenticate to the upstream registry.
    ///   - customRoleArn: Amazon Resource Name (ARN) of the IAM role to be assumed by Amazon ECR to authenticate to the ECR upstream registry. This role must be in the same account as the registry that you are configuring.
    ///   - ecrRepositoryPrefix: The repository name prefix to use when caching images from the source registry.  There is always an assumed / applied to the end of the prefix. If you specify ecr-public as the prefix, Amazon ECR treats that as ecr-public/.
    ///   - registryId: The Amazon Web Services account ID associated with the registry to create the pull through cache rule for. If you do not specify a registry, the default registry is assumed.
    ///   - upstreamRegistry: The name of the upstream registry.
    ///   - upstreamRegistryUrl: The registry URL of the upstream public registry to use as the source for the pull through cache rule. The following is the syntax to use for each supported upstream registry.   Amazon ECR (ecr) – .dkr.ecr..amazonaws.com    Amazon ECR Public (ecr-public) – public.ecr.aws    Docker Hub (docker-hub) – registry-1.docker.io    GitHub Container Registry (github-container-registry) – ghcr.io    GitLab Container Registry (gitlab-container-registry) – registry.gitlab.com    Kubernetes (k8s) – registry.k8s.io    Microsoft Azure Container Registry (azure-container-registry) – .azurecr.io    Quay (quay) – quay.io
    ///   - upstreamRepositoryPrefix: The repository name prefix of the upstream registry to match with the upstream repository name. When this field isn't specified, Amazon ECR will use the ROOT.
    ///   - logger: Logger use during operation
    @inlinable
    public func createPullThroughCacheRule(
        credentialArn: String? = nil,
        customRoleArn: String? = nil,
        ecrRepositoryPrefix: String,
        registryId: String? = nil,
        upstreamRegistry: UpstreamRegistry? = nil,
        upstreamRegistryUrl: String,
        upstreamRepositoryPrefix: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreatePullThroughCacheRuleResponse {
        let input = CreatePullThroughCacheRuleRequest(
            credentialArn: credentialArn, 
            customRoleArn: customRoleArn, 
            ecrRepositoryPrefix: ecrRepositoryPrefix, 
            registryId: registryId, 
            upstreamRegistry: upstreamRegistry, 
            upstreamRegistryUrl: upstreamRegistryUrl, 
            upstreamRepositoryPrefix: upstreamRepositoryPrefix
        )
        return try await self.createPullThroughCacheRule(input, logger: logger)
    }

    /// Creates a repository. For more information, see Amazon ECR repositories in the Amazon Elastic Container Registry User Guide.
    @Sendable
    @inlinable
    public func createRepository(_ input: CreateRepositoryRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateRepositoryResponse {
        try await self.client.execute(
            operation: "CreateRepository", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a repository. For more information, see Amazon ECR repositories in the Amazon Elastic Container Registry User Guide.
    ///
    /// Parameters:
    ///   - encryptionConfiguration: The encryption configuration for the repository. This determines how the contents of your repository are encrypted at rest.
    ///   - imageScanningConfiguration: The image scanning configuration for the repository. This determines whether images are scanned for known vulnerabilities after being pushed to the repository.
    ///   - imageTagMutability: The tag mutability setting for the repository. If this parameter is omitted, the default setting of MUTABLE will be used which will allow image tags to be overwritten. If IMMUTABLE is specified, all image tags within the repository will be immutable which will prevent them from being overwritten.
    ///   - registryId: The Amazon Web Services account ID associated with the registry to create the repository. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryName: The name to use for the repository. The repository name may be specified on its own (such as nginx-web-app) or it can be prepended with a namespace to group the repository into a category (such as project-a/nginx-web-app). The repository name must start with a letter and can only contain lowercase letters, numbers, hyphens, underscores, and forward slashes.
    ///   - tags: The metadata that you apply to the repository to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
    ///   - logger: Logger use during operation
    @inlinable
    public func createRepository(
        encryptionConfiguration: EncryptionConfiguration? = nil,
        imageScanningConfiguration: ImageScanningConfiguration? = nil,
        imageTagMutability: ImageTagMutability? = nil,
        registryId: String? = nil,
        repositoryName: String,
        tags: [Tag]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateRepositoryResponse {
        let input = CreateRepositoryRequest(
            encryptionConfiguration: encryptionConfiguration, 
            imageScanningConfiguration: imageScanningConfiguration, 
            imageTagMutability: imageTagMutability, 
            registryId: registryId, 
            repositoryName: repositoryName, 
            tags: tags
        )
        return try await self.createRepository(input, logger: logger)
    }

    /// Creates a repository creation template. This template is used to define the settings for repositories created by Amazon ECR on your behalf. For example, repositories created through pull through cache actions. For more information, see Private repository creation templates in the Amazon Elastic Container Registry User Guide.
    @Sendable
    @inlinable
    public func createRepositoryCreationTemplate(_ input: CreateRepositoryCreationTemplateRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateRepositoryCreationTemplateResponse {
        try await self.client.execute(
            operation: "CreateRepositoryCreationTemplate", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a repository creation template. This template is used to define the settings for repositories created by Amazon ECR on your behalf. For example, repositories created through pull through cache actions. For more information, see Private repository creation templates in the Amazon Elastic Container Registry User Guide.
    ///
    /// Parameters:
    ///   - appliedFor: A list of enumerable strings representing the Amazon ECR repository creation scenarios that this template will apply towards. The two supported scenarios are PULL_THROUGH_CACHE and REPLICATION
    ///   - customRoleArn: The ARN of the role to be assumed by Amazon ECR. This role must be in the same account as the registry that you are configuring. Amazon ECR will assume your supplied role when the customRoleArn is specified. When this field isn't specified, Amazon ECR will use the service-linked role for the repository creation template.
    ///   - description: A description for the repository creation template.
    ///   - encryptionConfiguration: The encryption configuration to use for repositories created using the template.
    ///   - imageTagMutability: The tag mutability setting for the repository. If this parameter is omitted, the default setting of MUTABLE will be used which will allow image tags to be overwritten. If IMMUTABLE is specified, all image tags within the repository will be immutable which will prevent them from being overwritten.
    ///   - lifecyclePolicy: The lifecycle policy to use for repositories created using the template.
    ///   - prefix: The repository namespace prefix to associate with the template. All repositories created using this namespace prefix will have the settings defined in this template applied. For example, a prefix of prod would apply to all repositories beginning with prod/. Similarly, a prefix of prod/team would apply to all repositories beginning with prod/team/. To apply a template to all repositories in your registry that don't have an associated creation template, you can use ROOT as the prefix.  There is always an assumed / applied to the end of the prefix. If you specify ecr-public as the prefix, Amazon ECR treats that as ecr-public/. When using a pull through cache rule, the repository prefix you specify during rule creation is what you should specify as your repository creation template prefix as well.
    ///   - repositoryPolicy: The repository policy to apply to repositories created using the template. A repository policy is a permissions policy associated with a repository to control access permissions.
    ///   - resourceTags: The metadata to apply to the repository to help you categorize and organize. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
    ///   - logger: Logger use during operation
    @inlinable
    public func createRepositoryCreationTemplate(
        appliedFor: [RCTAppliedFor],
        customRoleArn: String? = nil,
        description: String? = nil,
        encryptionConfiguration: EncryptionConfigurationForRepositoryCreationTemplate? = nil,
        imageTagMutability: ImageTagMutability? = nil,
        lifecyclePolicy: String? = nil,
        prefix: String,
        repositoryPolicy: String? = nil,
        resourceTags: [Tag]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateRepositoryCreationTemplateResponse {
        let input = CreateRepositoryCreationTemplateRequest(
            appliedFor: appliedFor, 
            customRoleArn: customRoleArn, 
            description: description, 
            encryptionConfiguration: encryptionConfiguration, 
            imageTagMutability: imageTagMutability, 
            lifecyclePolicy: lifecyclePolicy, 
            prefix: prefix, 
            repositoryPolicy: repositoryPolicy, 
            resourceTags: resourceTags
        )
        return try await self.createRepositoryCreationTemplate(input, logger: logger)
    }

    /// Deletes the lifecycle policy associated with the specified repository.
    @Sendable
    @inlinable
    public func deleteLifecyclePolicy(_ input: DeleteLifecyclePolicyRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteLifecyclePolicyResponse {
        try await self.client.execute(
            operation: "DeleteLifecyclePolicy", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes the lifecycle policy associated with the specified repository.
    ///
    /// Parameters:
    ///   - registryId: The Amazon Web Services account ID associated with the registry that contains the repository. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryName: The name of the repository.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteLifecyclePolicy(
        registryId: String? = nil,
        repositoryName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteLifecyclePolicyResponse {
        let input = DeleteLifecyclePolicyRequest(
            registryId: registryId, 
            repositoryName: repositoryName
        )
        return try await self.deleteLifecyclePolicy(input, logger: logger)
    }

    /// Deletes a pull through cache rule.
    @Sendable
    @inlinable
    public func deletePullThroughCacheRule(_ input: DeletePullThroughCacheRuleRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeletePullThroughCacheRuleResponse {
        try await self.client.execute(
            operation: "DeletePullThroughCacheRule", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a pull through cache rule.
    ///
    /// Parameters:
    ///   - ecrRepositoryPrefix: The Amazon ECR repository prefix associated with the pull through cache rule to delete.
    ///   - registryId: The Amazon Web Services account ID associated with the registry that contains the pull through cache rule. If you do not specify a registry, the default registry is assumed.
    ///   - logger: Logger use during operation
    @inlinable
    public func deletePullThroughCacheRule(
        ecrRepositoryPrefix: String,
        registryId: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeletePullThroughCacheRuleResponse {
        let input = DeletePullThroughCacheRuleRequest(
            ecrRepositoryPrefix: ecrRepositoryPrefix, 
            registryId: registryId
        )
        return try await self.deletePullThroughCacheRule(input, logger: logger)
    }

    /// Deletes the registry permissions policy.
    @Sendable
    @inlinable
    public func deleteRegistryPolicy(_ input: DeleteRegistryPolicyRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteRegistryPolicyResponse {
        try await self.client.execute(
            operation: "DeleteRegistryPolicy", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes the registry permissions policy.
    ///
    /// Parameters:
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteRegistryPolicy(
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteRegistryPolicyResponse {
        let input = DeleteRegistryPolicyRequest(
        )
        return try await self.deleteRegistryPolicy(input, logger: logger)
    }

    /// Deletes a repository. If the repository isn't empty, you must either delete the contents of the repository or use the force option to delete the repository and have Amazon ECR delete all of its contents on your behalf.
    @Sendable
    @inlinable
    public func deleteRepository(_ input: DeleteRepositoryRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteRepositoryResponse {
        try await self.client.execute(
            operation: "DeleteRepository", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a repository. If the repository isn't empty, you must either delete the contents of the repository or use the force option to delete the repository and have Amazon ECR delete all of its contents on your behalf.
    ///
    /// Parameters:
    ///   - force: If true, deleting the repository force deletes the contents of the repository. If false, the repository must be empty before attempting to delete it.
    ///   - registryId: The Amazon Web Services account ID associated with the registry that contains the repository to delete. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryName: The name of the repository to delete.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteRepository(
        force: Bool? = nil,
        registryId: String? = nil,
        repositoryName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteRepositoryResponse {
        let input = DeleteRepositoryRequest(
            force: force, 
            registryId: registryId, 
            repositoryName: repositoryName
        )
        return try await self.deleteRepository(input, logger: logger)
    }

    /// Deletes a repository creation template.
    @Sendable
    @inlinable
    public func deleteRepositoryCreationTemplate(_ input: DeleteRepositoryCreationTemplateRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteRepositoryCreationTemplateResponse {
        try await self.client.execute(
            operation: "DeleteRepositoryCreationTemplate", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a repository creation template.
    ///
    /// Parameters:
    ///   - prefix: The repository namespace prefix associated with the repository creation template.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteRepositoryCreationTemplate(
        prefix: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteRepositoryCreationTemplateResponse {
        let input = DeleteRepositoryCreationTemplateRequest(
            prefix: prefix
        )
        return try await self.deleteRepositoryCreationTemplate(input, logger: logger)
    }

    /// Deletes the repository policy associated with the specified repository.
    @Sendable
    @inlinable
    public func deleteRepositoryPolicy(_ input: DeleteRepositoryPolicyRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteRepositoryPolicyResponse {
        try await self.client.execute(
            operation: "DeleteRepositoryPolicy", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes the repository policy associated with the specified repository.
    ///
    /// Parameters:
    ///   - registryId: The Amazon Web Services account ID associated with the registry that contains the repository policy to delete. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryName: The name of the repository that is associated with the repository policy to delete.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteRepositoryPolicy(
        registryId: String? = nil,
        repositoryName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteRepositoryPolicyResponse {
        let input = DeleteRepositoryPolicyRequest(
            registryId: registryId, 
            repositoryName: repositoryName
        )
        return try await self.deleteRepositoryPolicy(input, logger: logger)
    }

    /// Returns the replication status for a specified image.
    @Sendable
    @inlinable
    public func describeImageReplicationStatus(_ input: DescribeImageReplicationStatusRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeImageReplicationStatusResponse {
        try await self.client.execute(
            operation: "DescribeImageReplicationStatus", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the replication status for a specified image.
    ///
    /// Parameters:
    ///   - imageId: 
    ///   - registryId: The Amazon Web Services account ID associated with the registry. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryName: The name of the repository that the image is in.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeImageReplicationStatus(
        imageId: ImageIdentifier,
        registryId: String? = nil,
        repositoryName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeImageReplicationStatusResponse {
        let input = DescribeImageReplicationStatusRequest(
            imageId: imageId, 
            registryId: registryId, 
            repositoryName: repositoryName
        )
        return try await self.describeImageReplicationStatus(input, logger: logger)
    }

    /// Returns the scan findings for the specified image.
    @Sendable
    @inlinable
    public func describeImageScanFindings(_ input: DescribeImageScanFindingsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeImageScanFindingsResponse {
        try await self.client.execute(
            operation: "DescribeImageScanFindings", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the scan findings for the specified image.
    ///
    /// Parameters:
    ///   - imageId: 
    ///   - maxResults: The maximum number of image scan results returned by DescribeImageScanFindings in paginated output. When this parameter is used, DescribeImageScanFindings only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another DescribeImageScanFindings request with the returned nextToken value. This value can be between 1 and 1000. If this parameter is not used, then DescribeImageScanFindings returns up to 100 results and a nextToken value, if applicable.
    ///   - nextToken: The nextToken value returned from a previous paginated DescribeImageScanFindings request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return.
    ///   - registryId: The Amazon Web Services account ID associated with the registry that contains the repository in which to describe the image scan findings for. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryName: The repository for the image for which to describe the scan findings.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeImageScanFindings(
        imageId: ImageIdentifier,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        registryId: String? = nil,
        repositoryName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeImageScanFindingsResponse {
        let input = DescribeImageScanFindingsRequest(
            imageId: imageId, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            registryId: registryId, 
            repositoryName: repositoryName
        )
        return try await self.describeImageScanFindings(input, logger: logger)
    }

    /// Returns metadata about the images in a repository.  Starting with Docker version 1.9, the Docker client compresses image layers before pushing them to a V2 Docker registry. The output of the docker images command shows the uncompressed image size. Therefore, Docker might return a larger image than the image shown in the Amazon Web Services Management Console.   The new version of Amazon ECR Basic Scanning doesn't use the ImageDetail$imageScanFindingsSummary and ImageDetail$imageScanStatus attributes from the API response to return scan results. Use the DescribeImageScanFindings API instead. For more information about Amazon Web Services native basic scanning, see  Scan images for software vulnerabilities in Amazon ECR.
    @Sendable
    @inlinable
    public func describeImages(_ input: DescribeImagesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeImagesResponse {
        try await self.client.execute(
            operation: "DescribeImages", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns metadata about the images in a repository.  Starting with Docker version 1.9, the Docker client compresses image layers before pushing them to a V2 Docker registry. The output of the docker images command shows the uncompressed image size. Therefore, Docker might return a larger image than the image shown in the Amazon Web Services Management Console.   The new version of Amazon ECR Basic Scanning doesn't use the ImageDetail$imageScanFindingsSummary and ImageDetail$imageScanStatus attributes from the API response to return scan results. Use the DescribeImageScanFindings API instead. For more information about Amazon Web Services native basic scanning, see  Scan images for software vulnerabilities in Amazon ECR.
    ///
    /// Parameters:
    ///   - filter: The filter key and value with which to filter your DescribeImages results.
    ///   - imageIds: The list of image IDs for the requested repository.
    ///   - maxResults: The maximum number of repository results returned by DescribeImages in paginated output. When this parameter is used, DescribeImages only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another DescribeImages request with the returned nextToken value. This value can be between 1 and 1000. If this parameter is not used, then DescribeImages returns up to 100 results and a nextToken value, if applicable. This option cannot be used when you specify images with imageIds.
    ///   - nextToken: The nextToken value returned from a previous paginated DescribeImages request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return. This option cannot be used when you specify images with imageIds.
    ///   - registryId: The Amazon Web Services account ID associated with the registry that contains the repository in which to describe images. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryName: The repository that contains the images to describe.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeImages(
        filter: DescribeImagesFilter? = nil,
        imageIds: [ImageIdentifier]? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        registryId: String? = nil,
        repositoryName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeImagesResponse {
        let input = DescribeImagesRequest(
            filter: filter, 
            imageIds: imageIds, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            registryId: registryId, 
            repositoryName: repositoryName
        )
        return try await self.describeImages(input, logger: logger)
    }

    /// Returns the pull through cache rules for a registry.
    @Sendable
    @inlinable
    public func describePullThroughCacheRules(_ input: DescribePullThroughCacheRulesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribePullThroughCacheRulesResponse {
        try await self.client.execute(
            operation: "DescribePullThroughCacheRules", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the pull through cache rules for a registry.
    ///
    /// Parameters:
    ///   - ecrRepositoryPrefixes: The Amazon ECR repository prefixes associated with the pull through cache rules to return. If no repository prefix value is specified, all pull through cache rules are returned.
    ///   - maxResults: The maximum number of pull through cache rules returned by DescribePullThroughCacheRulesRequest in paginated output. When this parameter is used, DescribePullThroughCacheRulesRequest only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another DescribePullThroughCacheRulesRequest request with the returned nextToken value. This value can be between 1 and 1000. If this parameter is not used, then DescribePullThroughCacheRulesRequest returns up to 100 results and a nextToken value, if applicable.
    ///   - nextToken: The nextToken value returned from a previous paginated DescribePullThroughCacheRulesRequest request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return.
    ///   - registryId: The Amazon Web Services account ID associated with the registry to return the pull through cache rules for. If you do not specify a registry, the default registry is assumed.
    ///   - logger: Logger use during operation
    @inlinable
    public func describePullThroughCacheRules(
        ecrRepositoryPrefixes: [String]? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        registryId: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribePullThroughCacheRulesResponse {
        let input = DescribePullThroughCacheRulesRequest(
            ecrRepositoryPrefixes: ecrRepositoryPrefixes, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            registryId: registryId
        )
        return try await self.describePullThroughCacheRules(input, logger: logger)
    }

    /// Describes the settings for a registry. The replication configuration for a repository can be created or updated with the PutReplicationConfiguration API action.
    @Sendable
    @inlinable
    public func describeRegistry(_ input: DescribeRegistryRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeRegistryResponse {
        try await self.client.execute(
            operation: "DescribeRegistry", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Describes the settings for a registry. The replication configuration for a repository can be created or updated with the PutReplicationConfiguration API action.
    ///
    /// Parameters:
    ///   - logger: Logger use during operation
    @inlinable
    public func describeRegistry(
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeRegistryResponse {
        let input = DescribeRegistryRequest(
        )
        return try await self.describeRegistry(input, logger: logger)
    }

    /// Describes image repositories in a registry.
    @Sendable
    @inlinable
    public func describeRepositories(_ input: DescribeRepositoriesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeRepositoriesResponse {
        try await self.client.execute(
            operation: "DescribeRepositories", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Describes image repositories in a registry.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of repository results returned by DescribeRepositories in paginated output. When this parameter is used, DescribeRepositories only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another DescribeRepositories request with the returned nextToken value. This value can be between 1 and 1000. If this parameter is not used, then DescribeRepositories returns up to 100 results and a nextToken value, if applicable. This option cannot be used when you specify repositories with repositoryNames.
    ///   - nextToken: The nextToken value returned from a previous paginated DescribeRepositories request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return. This option cannot be used when you specify repositories with repositoryNames.  This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
    ///   - registryId: The Amazon Web Services account ID associated with the registry that contains the repositories to be described. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryNames: A list of repositories to describe. If this parameter is omitted, then all repositories in a registry are described.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeRepositories(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        registryId: String? = nil,
        repositoryNames: [String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeRepositoriesResponse {
        let input = DescribeRepositoriesRequest(
            maxResults: maxResults, 
            nextToken: nextToken, 
            registryId: registryId, 
            repositoryNames: repositoryNames
        )
        return try await self.describeRepositories(input, logger: logger)
    }

    /// Returns details about the repository creation templates in a registry. The prefixes request parameter can be used to return the details for a specific repository creation template.
    @Sendable
    @inlinable
    public func describeRepositoryCreationTemplates(_ input: DescribeRepositoryCreationTemplatesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DescribeRepositoryCreationTemplatesResponse {
        try await self.client.execute(
            operation: "DescribeRepositoryCreationTemplates", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns details about the repository creation templates in a registry. The prefixes request parameter can be used to return the details for a specific repository creation template.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of repository results returned by DescribeRepositoryCreationTemplatesRequest in paginated output. When this parameter is used, DescribeRepositoryCreationTemplatesRequest only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another DescribeRepositoryCreationTemplatesRequest request with the returned nextToken value. This value can be between 1 and 1000. If this parameter is not used, then DescribeRepositoryCreationTemplatesRequest returns up to 100 results and a nextToken value, if applicable.
    ///   - nextToken: The nextToken value returned from a previous paginated DescribeRepositoryCreationTemplates request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return.  This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
    ///   - prefixes: The repository namespace prefixes associated with the repository creation templates to describe. If this value is not specified, all repository creation templates are returned.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeRepositoryCreationTemplates(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        prefixes: [String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DescribeRepositoryCreationTemplatesResponse {
        let input = DescribeRepositoryCreationTemplatesRequest(
            maxResults: maxResults, 
            nextToken: nextToken, 
            prefixes: prefixes
        )
        return try await self.describeRepositoryCreationTemplates(input, logger: logger)
    }

    /// Retrieves the account setting value for the specified setting name.
    @Sendable
    @inlinable
    public func getAccountSetting(_ input: GetAccountSettingRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetAccountSettingResponse {
        try await self.client.execute(
            operation: "GetAccountSetting", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the account setting value for the specified setting name.
    ///
    /// Parameters:
    ///   - name: The name of the account setting, such as BASIC_SCAN_TYPE_VERSION or REGISTRY_POLICY_SCOPE.
    ///   - logger: Logger use during operation
    @inlinable
    public func getAccountSetting(
        name: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetAccountSettingResponse {
        let input = GetAccountSettingRequest(
            name: name
        )
        return try await self.getAccountSetting(input, logger: logger)
    }

    /// Retrieves an authorization token. An authorization token represents your IAM authentication credentials and can be used to access any Amazon ECR registry that your IAM principal has access to. The authorization token is valid for 12 hours. The authorizationToken returned is a base64 encoded string that can be decoded and used in a docker login command to authenticate to a registry. The CLI offers an get-login-password command that simplifies the login process. For more information, see Registry authentication in the Amazon Elastic Container Registry User Guide.
    @Sendable
    @inlinable
    public func getAuthorizationToken(_ input: GetAuthorizationTokenRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetAuthorizationTokenResponse {
        try await self.client.execute(
            operation: "GetAuthorizationToken", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves an authorization token. An authorization token represents your IAM authentication credentials and can be used to access any Amazon ECR registry that your IAM principal has access to. The authorization token is valid for 12 hours. The authorizationToken returned is a base64 encoded string that can be decoded and used in a docker login command to authenticate to a registry. The CLI offers an get-login-password command that simplifies the login process. For more information, see Registry authentication in the Amazon Elastic Container Registry User Guide.
    ///
    /// Parameters:
    ///   - logger: Logger use during operation
    @inlinable
    public func getAuthorizationToken(
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetAuthorizationTokenResponse {
        let input = GetAuthorizationTokenRequest(
        )
        return try await self.getAuthorizationToken(input, logger: logger)
    }

    /// Retrieves the pre-signed Amazon S3 download URL corresponding to an image layer. You can only get URLs for image layers that are referenced in an image. When an image is pulled, the GetDownloadUrlForLayer API is called once per image layer that is not already cached.  This operation is used by the Amazon ECR proxy and is not generally used by customers for pulling and pushing images. In most cases, you should use the docker CLI to pull, tag, and push images.
    @Sendable
    @inlinable
    public func getDownloadUrlForLayer(_ input: GetDownloadUrlForLayerRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetDownloadUrlForLayerResponse {
        try await self.client.execute(
            operation: "GetDownloadUrlForLayer", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the pre-signed Amazon S3 download URL corresponding to an image layer. You can only get URLs for image layers that are referenced in an image. When an image is pulled, the GetDownloadUrlForLayer API is called once per image layer that is not already cached.  This operation is used by the Amazon ECR proxy and is not generally used by customers for pulling and pushing images. In most cases, you should use the docker CLI to pull, tag, and push images.
    ///
    /// Parameters:
    ///   - layerDigest: The digest of the image layer to download.
    ///   - registryId: The Amazon Web Services account ID associated with the registry that contains the image layer to download. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryName: The name of the repository that is associated with the image layer to download.
    ///   - logger: Logger use during operation
    @inlinable
    public func getDownloadUrlForLayer(
        layerDigest: String,
        registryId: String? = nil,
        repositoryName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetDownloadUrlForLayerResponse {
        let input = GetDownloadUrlForLayerRequest(
            layerDigest: layerDigest, 
            registryId: registryId, 
            repositoryName: repositoryName
        )
        return try await self.getDownloadUrlForLayer(input, logger: logger)
    }

    /// Retrieves the lifecycle policy for the specified repository.
    @Sendable
    @inlinable
    public func getLifecyclePolicy(_ input: GetLifecyclePolicyRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetLifecyclePolicyResponse {
        try await self.client.execute(
            operation: "GetLifecyclePolicy", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the lifecycle policy for the specified repository.
    ///
    /// Parameters:
    ///   - registryId: The Amazon Web Services account ID associated with the registry that contains the repository. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryName: The name of the repository.
    ///   - logger: Logger use during operation
    @inlinable
    public func getLifecyclePolicy(
        registryId: String? = nil,
        repositoryName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetLifecyclePolicyResponse {
        let input = GetLifecyclePolicyRequest(
            registryId: registryId, 
            repositoryName: repositoryName
        )
        return try await self.getLifecyclePolicy(input, logger: logger)
    }

    /// Retrieves the results of the lifecycle policy preview request for the specified repository.
    @Sendable
    @inlinable
    public func getLifecyclePolicyPreview(_ input: GetLifecyclePolicyPreviewRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetLifecyclePolicyPreviewResponse {
        try await self.client.execute(
            operation: "GetLifecyclePolicyPreview", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the results of the lifecycle policy preview request for the specified repository.
    ///
    /// Parameters:
    ///   - filter: An optional parameter that filters results based on image tag status and all tags, if tagged.
    ///   - imageIds: The list of imageIDs to be included.
    ///   - maxResults: The maximum number of repository results returned by GetLifecyclePolicyPreviewRequest in  paginated output. When this parameter is used, GetLifecyclePolicyPreviewRequest only returns  maxResults results in a single page along with a nextToken  response element. The remaining results of the initial request can be seen by sending  another GetLifecyclePolicyPreviewRequest request with the returned nextToken  value. This value can be between 1 and 100. If this  parameter is not used, then GetLifecyclePolicyPreviewRequest returns up to 100 results and a nextToken value, if  applicable. This option cannot be used when you specify images with imageIds.
    ///   - nextToken: The nextToken value returned from a previous paginated  GetLifecyclePolicyPreviewRequest request where maxResults was used and the  results exceeded the value of that parameter. Pagination continues from the end of the  previous results that returned the nextToken value. This value is  null when there are no more results to return. This option cannot be used when you specify images with imageIds.
    ///   - registryId: The Amazon Web Services account ID associated with the registry that contains the repository. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryName: The name of the repository.
    ///   - logger: Logger use during operation
    @inlinable
    public func getLifecyclePolicyPreview(
        filter: LifecyclePolicyPreviewFilter? = nil,
        imageIds: [ImageIdentifier]? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        registryId: String? = nil,
        repositoryName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetLifecyclePolicyPreviewResponse {
        let input = GetLifecyclePolicyPreviewRequest(
            filter: filter, 
            imageIds: imageIds, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            registryId: registryId, 
            repositoryName: repositoryName
        )
        return try await self.getLifecyclePolicyPreview(input, logger: logger)
    }

    /// Retrieves the permissions policy for a registry.
    @Sendable
    @inlinable
    public func getRegistryPolicy(_ input: GetRegistryPolicyRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetRegistryPolicyResponse {
        try await self.client.execute(
            operation: "GetRegistryPolicy", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the permissions policy for a registry.
    ///
    /// Parameters:
    ///   - logger: Logger use during operation
    @inlinable
    public func getRegistryPolicy(
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetRegistryPolicyResponse {
        let input = GetRegistryPolicyRequest(
        )
        return try await self.getRegistryPolicy(input, logger: logger)
    }

    /// Retrieves the scanning configuration for a registry.
    @Sendable
    @inlinable
    public func getRegistryScanningConfiguration(_ input: GetRegistryScanningConfigurationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetRegistryScanningConfigurationResponse {
        try await self.client.execute(
            operation: "GetRegistryScanningConfiguration", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the scanning configuration for a registry.
    ///
    /// Parameters:
    ///   - logger: Logger use during operation
    @inlinable
    public func getRegistryScanningConfiguration(
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetRegistryScanningConfigurationResponse {
        let input = GetRegistryScanningConfigurationRequest(
        )
        return try await self.getRegistryScanningConfiguration(input, logger: logger)
    }

    /// Retrieves the repository policy for the specified repository.
    @Sendable
    @inlinable
    public func getRepositoryPolicy(_ input: GetRepositoryPolicyRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetRepositoryPolicyResponse {
        try await self.client.execute(
            operation: "GetRepositoryPolicy", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the repository policy for the specified repository.
    ///
    /// Parameters:
    ///   - registryId: The Amazon Web Services account ID associated with the registry that contains the repository. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryName: The name of the repository with the policy to retrieve.
    ///   - logger: Logger use during operation
    @inlinable
    public func getRepositoryPolicy(
        registryId: String? = nil,
        repositoryName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetRepositoryPolicyResponse {
        let input = GetRepositoryPolicyRequest(
            registryId: registryId, 
            repositoryName: repositoryName
        )
        return try await self.getRepositoryPolicy(input, logger: logger)
    }

    /// Notifies Amazon ECR that you intend to upload an image layer. When an image is pushed, the InitiateLayerUpload API is called once per image layer that has not already been uploaded. Whether or not an image layer has been uploaded is determined by the BatchCheckLayerAvailability API action.  This operation is used by the Amazon ECR proxy and is not generally used by customers for pulling and pushing images. In most cases, you should use the docker CLI to pull, tag, and push images.
    @Sendable
    @inlinable
    public func initiateLayerUpload(_ input: InitiateLayerUploadRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> InitiateLayerUploadResponse {
        try await self.client.execute(
            operation: "InitiateLayerUpload", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Notifies Amazon ECR that you intend to upload an image layer. When an image is pushed, the InitiateLayerUpload API is called once per image layer that has not already been uploaded. Whether or not an image layer has been uploaded is determined by the BatchCheckLayerAvailability API action.  This operation is used by the Amazon ECR proxy and is not generally used by customers for pulling and pushing images. In most cases, you should use the docker CLI to pull, tag, and push images.
    ///
    /// Parameters:
    ///   - registryId: The Amazon Web Services account ID associated with the registry to which you intend to upload layers. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryName: The name of the repository to which you intend to upload layers.
    ///   - logger: Logger use during operation
    @inlinable
    public func initiateLayerUpload(
        registryId: String? = nil,
        repositoryName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> InitiateLayerUploadResponse {
        let input = InitiateLayerUploadRequest(
            registryId: registryId, 
            repositoryName: repositoryName
        )
        return try await self.initiateLayerUpload(input, logger: logger)
    }

    /// Lists all the image IDs for the specified repository. You can filter images based on whether or not they are tagged by using the tagStatus filter and specifying either TAGGED, UNTAGGED or ANY. For example, you can filter your results to return only UNTAGGED images and then pipe that result to a BatchDeleteImage operation to delete them. Or, you can filter your results to return only TAGGED images to list all of the tags in your repository.
    @Sendable
    @inlinable
    public func listImages(_ input: ListImagesRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListImagesResponse {
        try await self.client.execute(
            operation: "ListImages", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists all the image IDs for the specified repository. You can filter images based on whether or not they are tagged by using the tagStatus filter and specifying either TAGGED, UNTAGGED or ANY. For example, you can filter your results to return only UNTAGGED images and then pipe that result to a BatchDeleteImage operation to delete them. Or, you can filter your results to return only TAGGED images to list all of the tags in your repository.
    ///
    /// Parameters:
    ///   - filter: The filter key and value with which to filter your ListImages results.
    ///   - maxResults: The maximum number of image results returned by ListImages in paginated output. When this parameter is used, ListImages only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another ListImages request with the returned nextToken value. This value can be between 1 and 1000. If this parameter is not used, then ListImages returns up to 100 results and a nextToken value, if applicable.
    ///   - nextToken: The nextToken value returned from a previous paginated ListImages request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return.  This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
    ///   - registryId: The Amazon Web Services account ID associated with the registry that contains the repository in which to list images. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryName: The repository with image IDs to be listed.
    ///   - logger: Logger use during operation
    @inlinable
    public func listImages(
        filter: ListImagesFilter? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        registryId: String? = nil,
        repositoryName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListImagesResponse {
        let input = ListImagesRequest(
            filter: filter, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            registryId: registryId, 
            repositoryName: repositoryName
        )
        return try await self.listImages(input, logger: logger)
    }

    /// List the tags for an Amazon ECR resource.
    @Sendable
    @inlinable
    public func listTagsForResource(_ input: ListTagsForResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTagsForResourceResponse {
        try await self.client.execute(
            operation: "ListTagsForResource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// List the tags for an Amazon ECR resource.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) that identifies the resource for which to list the tags. Currently, the only supported resource is an Amazon ECR repository.
    ///   - logger: Logger use during operation
    @inlinable
    public func listTagsForResource(
        resourceArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTagsForResourceResponse {
        let input = ListTagsForResourceRequest(
            resourceArn: resourceArn
        )
        return try await self.listTagsForResource(input, logger: logger)
    }

    /// Allows you to change the basic scan type version or registry policy scope.
    @Sendable
    @inlinable
    public func putAccountSetting(_ input: PutAccountSettingRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> PutAccountSettingResponse {
        try await self.client.execute(
            operation: "PutAccountSetting", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Allows you to change the basic scan type version or registry policy scope.
    ///
    /// Parameters:
    ///   - name: The name of the account setting, such as BASIC_SCAN_TYPE_VERSION or REGISTRY_POLICY_SCOPE.
    ///   - value: Setting value that is specified. The following are valid values for the basic scan type being used: AWS_NATIVE or CLAIR. The following are valid values for the registry policy scope being used: V1 or V2.
    ///   - logger: Logger use during operation
    @inlinable
    public func putAccountSetting(
        name: String,
        value: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> PutAccountSettingResponse {
        let input = PutAccountSettingRequest(
            name: name, 
            value: value
        )
        return try await self.putAccountSetting(input, logger: logger)
    }

    /// Creates or updates the image manifest and tags associated with an image. When an image is pushed and all new image layers have been uploaded, the PutImage API is called once to create or update the image manifest and the tags associated with the image.  This operation is used by the Amazon ECR proxy and is not generally used by customers for pulling and pushing images. In most cases, you should use the docker CLI to pull, tag, and push images.
    @Sendable
    @inlinable
    public func putImage(_ input: PutImageRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> PutImageResponse {
        try await self.client.execute(
            operation: "PutImage", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates or updates the image manifest and tags associated with an image. When an image is pushed and all new image layers have been uploaded, the PutImage API is called once to create or update the image manifest and the tags associated with the image.  This operation is used by the Amazon ECR proxy and is not generally used by customers for pulling and pushing images. In most cases, you should use the docker CLI to pull, tag, and push images.
    ///
    /// Parameters:
    ///   - imageDigest: The image digest of the image manifest corresponding to the image.
    ///   - imageManifest: The image manifest corresponding to the image to be uploaded.
    ///   - imageManifestMediaType: The media type of the image manifest. If you push an image manifest that does not contain the mediaType field, you must specify the imageManifestMediaType in the request.
    ///   - imageTag: The tag to associate with the image. This parameter is required for images that use the Docker Image Manifest V2 Schema 2 or Open Container Initiative (OCI) formats.
    ///   - registryId: The Amazon Web Services account ID associated with the registry that contains the repository in which to put the image. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryName: The name of the repository in which to put the image.
    ///   - logger: Logger use during operation
    @inlinable
    public func putImage(
        imageDigest: String? = nil,
        imageManifest: String,
        imageManifestMediaType: String? = nil,
        imageTag: String? = nil,
        registryId: String? = nil,
        repositoryName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> PutImageResponse {
        let input = PutImageRequest(
            imageDigest: imageDigest, 
            imageManifest: imageManifest, 
            imageManifestMediaType: imageManifestMediaType, 
            imageTag: imageTag, 
            registryId: registryId, 
            repositoryName: repositoryName
        )
        return try await self.putImage(input, logger: logger)
    }

    ///  The PutImageScanningConfiguration API is being deprecated, in favor of specifying the image scanning configuration at the registry level. For more information, see PutRegistryScanningConfiguration.  Updates the image scanning configuration for the specified repository.
    @Sendable
    @inlinable
    public func putImageScanningConfiguration(_ input: PutImageScanningConfigurationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> PutImageScanningConfigurationResponse {
        try await self.client.execute(
            operation: "PutImageScanningConfiguration", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  The PutImageScanningConfiguration API is being deprecated, in favor of specifying the image scanning configuration at the registry level. For more information, see PutRegistryScanningConfiguration.  Updates the image scanning configuration for the specified repository.
    ///
    /// Parameters:
    ///   - imageScanningConfiguration: The image scanning configuration for the repository. This setting determines whether images are scanned for known vulnerabilities after being pushed to the repository.
    ///   - registryId: The Amazon Web Services account ID associated with the registry that contains the repository in which to update the image scanning configuration setting. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryName: The name of the repository in which to update the image scanning configuration setting.
    ///   - logger: Logger use during operation
    @inlinable
    public func putImageScanningConfiguration(
        imageScanningConfiguration: ImageScanningConfiguration,
        registryId: String? = nil,
        repositoryName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> PutImageScanningConfigurationResponse {
        let input = PutImageScanningConfigurationRequest(
            imageScanningConfiguration: imageScanningConfiguration, 
            registryId: registryId, 
            repositoryName: repositoryName
        )
        return try await self.putImageScanningConfiguration(input, logger: logger)
    }

    /// Updates the image tag mutability settings for the specified repository. For more information, see Image tag mutability in the Amazon Elastic Container Registry User Guide.
    @Sendable
    @inlinable
    public func putImageTagMutability(_ input: PutImageTagMutabilityRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> PutImageTagMutabilityResponse {
        try await self.client.execute(
            operation: "PutImageTagMutability", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates the image tag mutability settings for the specified repository. For more information, see Image tag mutability in the Amazon Elastic Container Registry User Guide.
    ///
    /// Parameters:
    ///   - imageTagMutability: The tag mutability setting for the repository. If MUTABLE is specified, image tags can be overwritten. If IMMUTABLE is specified, all image tags within the repository will be immutable which will prevent them from being overwritten.
    ///   - registryId: The Amazon Web Services account ID associated with the registry that contains the repository in which to update the image tag mutability settings. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryName: The name of the repository in which to update the image tag mutability settings.
    ///   - logger: Logger use during operation
    @inlinable
    public func putImageTagMutability(
        imageTagMutability: ImageTagMutability,
        registryId: String? = nil,
        repositoryName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> PutImageTagMutabilityResponse {
        let input = PutImageTagMutabilityRequest(
            imageTagMutability: imageTagMutability, 
            registryId: registryId, 
            repositoryName: repositoryName
        )
        return try await self.putImageTagMutability(input, logger: logger)
    }

    /// Creates or updates the lifecycle policy for the specified repository. For more information, see Lifecycle policy template.
    @Sendable
    @inlinable
    public func putLifecyclePolicy(_ input: PutLifecyclePolicyRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> PutLifecyclePolicyResponse {
        try await self.client.execute(
            operation: "PutLifecyclePolicy", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates or updates the lifecycle policy for the specified repository. For more information, see Lifecycle policy template.
    ///
    /// Parameters:
    ///   - lifecyclePolicyText: The JSON repository policy text to apply to the repository.
    ///   - registryId: The Amazon Web Services account ID associated with the registry that contains the repository. If you do  not specify a registry, the default registry is assumed.
    ///   - repositoryName: The name of the repository to receive the policy.
    ///   - logger: Logger use during operation
    @inlinable
    public func putLifecyclePolicy(
        lifecyclePolicyText: String,
        registryId: String? = nil,
        repositoryName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> PutLifecyclePolicyResponse {
        let input = PutLifecyclePolicyRequest(
            lifecyclePolicyText: lifecyclePolicyText, 
            registryId: registryId, 
            repositoryName: repositoryName
        )
        return try await self.putLifecyclePolicy(input, logger: logger)
    }

    /// Creates or updates the permissions policy for your registry. A registry policy is used to specify permissions for another Amazon Web Services account and is used when configuring cross-account replication. For more information, see Registry permissions in the Amazon Elastic Container Registry User Guide.
    @Sendable
    @inlinable
    public func putRegistryPolicy(_ input: PutRegistryPolicyRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> PutRegistryPolicyResponse {
        try await self.client.execute(
            operation: "PutRegistryPolicy", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates or updates the permissions policy for your registry. A registry policy is used to specify permissions for another Amazon Web Services account and is used when configuring cross-account replication. For more information, see Registry permissions in the Amazon Elastic Container Registry User Guide.
    ///
    /// Parameters:
    ///   - policyText: The JSON policy text to apply to your registry. The policy text follows the same format as IAM policy text. For more information, see Registry permissions in the Amazon Elastic Container Registry User Guide.
    ///   - logger: Logger use during operation
    @inlinable
    public func putRegistryPolicy(
        policyText: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> PutRegistryPolicyResponse {
        let input = PutRegistryPolicyRequest(
            policyText: policyText
        )
        return try await self.putRegistryPolicy(input, logger: logger)
    }

    /// Creates or updates the scanning configuration for your private registry.
    @Sendable
    @inlinable
    public func putRegistryScanningConfiguration(_ input: PutRegistryScanningConfigurationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> PutRegistryScanningConfigurationResponse {
        try await self.client.execute(
            operation: "PutRegistryScanningConfiguration", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates or updates the scanning configuration for your private registry.
    ///
    /// Parameters:
    ///   - rules: The scanning rules to use for the registry. A scanning rule is used to determine which repository filters are used and at what frequency scanning will occur.
    ///   - scanType: The scanning type to set for the registry. When a registry scanning configuration is not defined, by default the BASIC scan type is used. When basic scanning is used, you may specify filters to determine which individual repositories, or all repositories, are scanned when new images are pushed to those repositories. Alternatively, you can do manual scans of images with basic scanning. When the ENHANCED scan type is set, Amazon Inspector provides automated vulnerability scanning. You may choose between continuous scanning or scan on push and you may specify filters to determine which individual repositories, or all repositories, are scanned.
    ///   - logger: Logger use during operation
    @inlinable
    public func putRegistryScanningConfiguration(
        rules: [RegistryScanningRule]? = nil,
        scanType: ScanType? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> PutRegistryScanningConfigurationResponse {
        let input = PutRegistryScanningConfigurationRequest(
            rules: rules, 
            scanType: scanType
        )
        return try await self.putRegistryScanningConfiguration(input, logger: logger)
    }

    /// Creates or updates the replication configuration for a registry. The existing replication configuration for a repository can be retrieved with the DescribeRegistry API action. The first time the PutReplicationConfiguration API is called, a service-linked IAM role is created in your account for the replication process. For more information, see Using service-linked roles for Amazon ECR in the Amazon Elastic Container Registry User Guide. For more information on the custom role for replication, see Creating an IAM role for replication.  When configuring cross-account replication, the destination account must grant the source account permission to replicate. This permission is controlled using a registry permissions policy. For more information, see PutRegistryPolicy.
    @Sendable
    @inlinable
    public func putReplicationConfiguration(_ input: PutReplicationConfigurationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> PutReplicationConfigurationResponse {
        try await self.client.execute(
            operation: "PutReplicationConfiguration", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates or updates the replication configuration for a registry. The existing replication configuration for a repository can be retrieved with the DescribeRegistry API action. The first time the PutReplicationConfiguration API is called, a service-linked IAM role is created in your account for the replication process. For more information, see Using service-linked roles for Amazon ECR in the Amazon Elastic Container Registry User Guide. For more information on the custom role for replication, see Creating an IAM role for replication.  When configuring cross-account replication, the destination account must grant the source account permission to replicate. This permission is controlled using a registry permissions policy. For more information, see PutRegistryPolicy.
    ///
    /// Parameters:
    ///   - replicationConfiguration: An object representing the replication configuration for a registry.
    ///   - logger: Logger use during operation
    @inlinable
    public func putReplicationConfiguration(
        replicationConfiguration: ReplicationConfiguration,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> PutReplicationConfigurationResponse {
        let input = PutReplicationConfigurationRequest(
            replicationConfiguration: replicationConfiguration
        )
        return try await self.putReplicationConfiguration(input, logger: logger)
    }

    /// Applies a repository policy to the specified repository to control access permissions. For more information, see Amazon ECR Repository policies in the Amazon Elastic Container Registry User Guide.
    @Sendable
    @inlinable
    public func setRepositoryPolicy(_ input: SetRepositoryPolicyRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> SetRepositoryPolicyResponse {
        try await self.client.execute(
            operation: "SetRepositoryPolicy", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Applies a repository policy to the specified repository to control access permissions. For more information, see Amazon ECR Repository policies in the Amazon Elastic Container Registry User Guide.
    ///
    /// Parameters:
    ///   - force: If the policy you are attempting to set on a repository policy would prevent you from setting another policy in the future, you must force the SetRepositoryPolicy operation. This is intended to prevent accidental repository lock outs.
    ///   - policyText: The JSON repository policy text to apply to the repository. For more information, see Amazon ECR repository policies in the Amazon Elastic Container Registry User Guide.
    ///   - registryId: The Amazon Web Services account ID associated with the registry that contains the repository. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryName: The name of the repository to receive the policy.
    ///   - logger: Logger use during operation
    @inlinable
    public func setRepositoryPolicy(
        force: Bool? = nil,
        policyText: String,
        registryId: String? = nil,
        repositoryName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> SetRepositoryPolicyResponse {
        let input = SetRepositoryPolicyRequest(
            force: force, 
            policyText: policyText, 
            registryId: registryId, 
            repositoryName: repositoryName
        )
        return try await self.setRepositoryPolicy(input, logger: logger)
    }

    /// Starts a basic image vulnerability scan. A basic image scan can only be started once per 24 hours on an individual image. This limit includes if an image was scanned on initial push. You can start up to 100,000 basic scans per 24 hours. This limit includes both scans on initial push and scans initiated by the StartImageScan API. For more information, see Basic scanning in the Amazon Elastic Container Registry User Guide.
    @Sendable
    @inlinable
    public func startImageScan(_ input: StartImageScanRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> StartImageScanResponse {
        try await self.client.execute(
            operation: "StartImageScan", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Starts a basic image vulnerability scan. A basic image scan can only be started once per 24 hours on an individual image. This limit includes if an image was scanned on initial push. You can start up to 100,000 basic scans per 24 hours. This limit includes both scans on initial push and scans initiated by the StartImageScan API. For more information, see Basic scanning in the Amazon Elastic Container Registry User Guide.
    ///
    /// Parameters:
    ///   - imageId: 
    ///   - registryId: The Amazon Web Services account ID associated with the registry that contains the repository in which to start an image scan request. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryName: The name of the repository that contains the images to scan.
    ///   - logger: Logger use during operation
    @inlinable
    public func startImageScan(
        imageId: ImageIdentifier,
        registryId: String? = nil,
        repositoryName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> StartImageScanResponse {
        let input = StartImageScanRequest(
            imageId: imageId, 
            registryId: registryId, 
            repositoryName: repositoryName
        )
        return try await self.startImageScan(input, logger: logger)
    }

    /// Starts a preview of a lifecycle policy for the specified repository. This allows you to see the results before associating the lifecycle policy with the repository.
    @Sendable
    @inlinable
    public func startLifecyclePolicyPreview(_ input: StartLifecyclePolicyPreviewRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> StartLifecyclePolicyPreviewResponse {
        try await self.client.execute(
            operation: "StartLifecyclePolicyPreview", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Starts a preview of a lifecycle policy for the specified repository. This allows you to see the results before associating the lifecycle policy with the repository.
    ///
    /// Parameters:
    ///   - lifecyclePolicyText: The policy to be evaluated against. If you do not specify a policy, the current policy for the repository is used.
    ///   - registryId: The Amazon Web Services account ID associated with the registry that contains the repository. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryName: The name of the repository to be evaluated.
    ///   - logger: Logger use during operation
    @inlinable
    public func startLifecyclePolicyPreview(
        lifecyclePolicyText: String? = nil,
        registryId: String? = nil,
        repositoryName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> StartLifecyclePolicyPreviewResponse {
        let input = StartLifecyclePolicyPreviewRequest(
            lifecyclePolicyText: lifecyclePolicyText, 
            registryId: registryId, 
            repositoryName: repositoryName
        )
        return try await self.startLifecyclePolicyPreview(input, logger: logger)
    }

    /// Adds specified tags to a resource with the specified ARN. Existing tags on a resource are not changed if they are not specified in the request parameters.
    @Sendable
    @inlinable
    public func tagResource(_ input: TagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> TagResourceResponse {
        try await self.client.execute(
            operation: "TagResource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds specified tags to a resource with the specified ARN. Existing tags on a resource are not changed if they are not specified in the request parameters.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) of the the resource to which to add tags. Currently, the only supported resource is an Amazon ECR repository.
    ///   - tags: The tags to add to the resource. A tag is an array of key-value pairs. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
    ///   - logger: Logger use during operation
    @inlinable
    public func tagResource(
        resourceArn: String,
        tags: [Tag],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TagResourceResponse {
        let input = TagResourceRequest(
            resourceArn: resourceArn, 
            tags: tags
        )
        return try await self.tagResource(input, logger: logger)
    }

    /// Deletes specified tags from a resource.
    @Sendable
    @inlinable
    public func untagResource(_ input: UntagResourceRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UntagResourceResponse {
        try await self.client.execute(
            operation: "UntagResource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes specified tags from a resource.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) of the resource from which to remove tags. Currently, the only supported resource is an Amazon ECR repository.
    ///   - tagKeys: The keys of the tags to be removed.
    ///   - logger: Logger use during operation
    @inlinable
    public func untagResource(
        resourceArn: String,
        tagKeys: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UntagResourceResponse {
        let input = UntagResourceRequest(
            resourceArn: resourceArn, 
            tagKeys: tagKeys
        )
        return try await self.untagResource(input, logger: logger)
    }

    /// Updates an existing pull through cache rule.
    @Sendable
    @inlinable
    public func updatePullThroughCacheRule(_ input: UpdatePullThroughCacheRuleRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdatePullThroughCacheRuleResponse {
        try await self.client.execute(
            operation: "UpdatePullThroughCacheRule", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates an existing pull through cache rule.
    ///
    /// Parameters:
    ///   - credentialArn: The Amazon Resource Name (ARN) of the Amazon Web Services Secrets Manager secret that identifies the credentials to authenticate to the upstream registry.
    ///   - customRoleArn: Amazon Resource Name (ARN) of the IAM role to be assumed by Amazon ECR to authenticate to the ECR upstream registry. This role must be in the same account as the registry that you are configuring.
    ///   - ecrRepositoryPrefix: The repository name prefix to use when caching images from the source registry.
    ///   - registryId: The Amazon Web Services account ID associated with the registry associated with the pull through cache rule. If you do not specify a registry, the default registry is assumed.
    ///   - logger: Logger use during operation
    @inlinable
    public func updatePullThroughCacheRule(
        credentialArn: String? = nil,
        customRoleArn: String? = nil,
        ecrRepositoryPrefix: String,
        registryId: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdatePullThroughCacheRuleResponse {
        let input = UpdatePullThroughCacheRuleRequest(
            credentialArn: credentialArn, 
            customRoleArn: customRoleArn, 
            ecrRepositoryPrefix: ecrRepositoryPrefix, 
            registryId: registryId
        )
        return try await self.updatePullThroughCacheRule(input, logger: logger)
    }

    /// Updates an existing repository creation template.
    @Sendable
    @inlinable
    public func updateRepositoryCreationTemplate(_ input: UpdateRepositoryCreationTemplateRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateRepositoryCreationTemplateResponse {
        try await self.client.execute(
            operation: "UpdateRepositoryCreationTemplate", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates an existing repository creation template.
    ///
    /// Parameters:
    ///   - appliedFor: Updates the list of enumerable strings representing the Amazon ECR repository creation scenarios that this template will apply towards. The two supported scenarios are PULL_THROUGH_CACHE and REPLICATION
    ///   - customRoleArn: The ARN of the role to be assumed by Amazon ECR. This role must be in the same account as the registry that you are configuring. Amazon ECR will assume your supplied role when the customRoleArn is specified. When this field isn't specified, Amazon ECR will use the service-linked role for the repository creation template.
    ///   - description: A description for the repository creation template.
    ///   - encryptionConfiguration: 
    ///   - imageTagMutability: Updates the tag mutability setting for the repository. If this parameter is omitted, the default setting of MUTABLE will be used which will allow image tags to be overwritten. If IMMUTABLE is specified, all image tags within the repository will be immutable which will prevent them from being overwritten.
    ///   - lifecyclePolicy: Updates the lifecycle policy associated with the specified repository creation template.
    ///   - prefix: The repository namespace prefix that matches an existing repository creation template in the registry. All repositories created using this namespace prefix will have the settings defined in this template applied. For example, a prefix of prod would apply to all repositories beginning with prod/. This includes a repository named prod/team1 as well as a repository named prod/repository1. To apply a template to all repositories in your registry that don't have an associated creation template, you can use ROOT as the prefix.
    ///   - repositoryPolicy: Updates the repository policy created using the template. A repository policy is a permissions policy associated with a repository to control access permissions.
    ///   - resourceTags: The metadata to apply to the repository to help you categorize and organize. Each tag consists of a key and an optional value, both of which you define. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.
    ///   - logger: Logger use during operation
    @inlinable
    public func updateRepositoryCreationTemplate(
        appliedFor: [RCTAppliedFor]? = nil,
        customRoleArn: String? = nil,
        description: String? = nil,
        encryptionConfiguration: EncryptionConfigurationForRepositoryCreationTemplate? = nil,
        imageTagMutability: ImageTagMutability? = nil,
        lifecyclePolicy: String? = nil,
        prefix: String,
        repositoryPolicy: String? = nil,
        resourceTags: [Tag]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateRepositoryCreationTemplateResponse {
        let input = UpdateRepositoryCreationTemplateRequest(
            appliedFor: appliedFor, 
            customRoleArn: customRoleArn, 
            description: description, 
            encryptionConfiguration: encryptionConfiguration, 
            imageTagMutability: imageTagMutability, 
            lifecyclePolicy: lifecyclePolicy, 
            prefix: prefix, 
            repositoryPolicy: repositoryPolicy, 
            resourceTags: resourceTags
        )
        return try await self.updateRepositoryCreationTemplate(input, logger: logger)
    }

    /// Uploads an image layer part to Amazon ECR. When an image is pushed, each new image layer is uploaded in parts. The maximum size of each image layer part can be 20971520 bytes (or about 20MB). The UploadLayerPart API is called once per each new image layer part.  This operation is used by the Amazon ECR proxy and is not generally used by customers for pulling and pushing images. In most cases, you should use the docker CLI to pull, tag, and push images.
    @Sendable
    @inlinable
    public func uploadLayerPart(_ input: UploadLayerPartRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UploadLayerPartResponse {
        try await self.client.execute(
            operation: "UploadLayerPart", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Uploads an image layer part to Amazon ECR. When an image is pushed, each new image layer is uploaded in parts. The maximum size of each image layer part can be 20971520 bytes (or about 20MB). The UploadLayerPart API is called once per each new image layer part.  This operation is used by the Amazon ECR proxy and is not generally used by customers for pulling and pushing images. In most cases, you should use the docker CLI to pull, tag, and push images.
    ///
    /// Parameters:
    ///   - layerPartBlob: The base64-encoded layer part payload.
    ///   - partFirstByte: The position of the first byte of the layer part witin the overall image layer.
    ///   - partLastByte: The position of the last byte of the layer part within the overall image layer.
    ///   - registryId: The Amazon Web Services account ID associated with the registry to which you are uploading layer parts. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryName: The name of the repository to which you are uploading layer parts.
    ///   - uploadId: The upload ID from a previous InitiateLayerUpload operation to associate with the layer part upload.
    ///   - logger: Logger use during operation
    @inlinable
    public func uploadLayerPart(
        layerPartBlob: AWSBase64Data,
        partFirstByte: Int64,
        partLastByte: Int64,
        registryId: String? = nil,
        repositoryName: String,
        uploadId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UploadLayerPartResponse {
        let input = UploadLayerPartRequest(
            layerPartBlob: layerPartBlob, 
            partFirstByte: partFirstByte, 
            partLastByte: partLastByte, 
            registryId: registryId, 
            repositoryName: repositoryName, 
            uploadId: uploadId
        )
        return try await self.uploadLayerPart(input, logger: logger)
    }

    /// Validates an existing pull through cache rule for an upstream registry that requires authentication. This will retrieve the contents of the Amazon Web Services Secrets Manager secret, verify the syntax, and then validate that authentication to the upstream registry is successful.
    @Sendable
    @inlinable
    public func validatePullThroughCacheRule(_ input: ValidatePullThroughCacheRuleRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ValidatePullThroughCacheRuleResponse {
        try await self.client.execute(
            operation: "ValidatePullThroughCacheRule", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Validates an existing pull through cache rule for an upstream registry that requires authentication. This will retrieve the contents of the Amazon Web Services Secrets Manager secret, verify the syntax, and then validate that authentication to the upstream registry is successful.
    ///
    /// Parameters:
    ///   - ecrRepositoryPrefix: The repository name prefix associated with the pull through cache rule.
    ///   - registryId: The registry ID associated with the pull through cache rule. If you do not specify a registry, the default registry is assumed.
    ///   - logger: Logger use during operation
    @inlinable
    public func validatePullThroughCacheRule(
        ecrRepositoryPrefix: String,
        registryId: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ValidatePullThroughCacheRuleResponse {
        let input = ValidatePullThroughCacheRuleRequest(
            ecrRepositoryPrefix: ecrRepositoryPrefix, 
            registryId: registryId
        )
        return try await self.validatePullThroughCacheRule(input, logger: logger)
    }
}

extension ECR {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: ECR, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension ECR {
    /// Return PaginatorSequence for operation ``describeImageScanFindings(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func describeImageScanFindingsPaginator(
        _ input: DescribeImageScanFindingsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<DescribeImageScanFindingsRequest, DescribeImageScanFindingsResponse> {
        return .init(
            input: input,
            command: self.describeImageScanFindings,
            inputKey: \DescribeImageScanFindingsRequest.nextToken,
            outputKey: \DescribeImageScanFindingsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``describeImageScanFindings(_:logger:)``.
    ///
    /// - Parameters:
    ///   - imageId: 
    ///   - maxResults: The maximum number of image scan results returned by DescribeImageScanFindings in paginated output. When this parameter is used, DescribeImageScanFindings only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another DescribeImageScanFindings request with the returned nextToken value. This value can be between 1 and 1000. If this parameter is not used, then DescribeImageScanFindings returns up to 100 results and a nextToken value, if applicable.
    ///   - registryId: The Amazon Web Services account ID associated with the registry that contains the repository in which to describe the image scan findings for. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryName: The repository for the image for which to describe the scan findings.
    ///   - logger: Logger used for logging
    @inlinable
    public func describeImageScanFindingsPaginator(
        imageId: ImageIdentifier,
        maxResults: Int? = nil,
        registryId: String? = nil,
        repositoryName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<DescribeImageScanFindingsRequest, DescribeImageScanFindingsResponse> {
        let input = DescribeImageScanFindingsRequest(
            imageId: imageId, 
            maxResults: maxResults, 
            registryId: registryId, 
            repositoryName: repositoryName
        )
        return self.describeImageScanFindingsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``describeImages(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func describeImagesPaginator(
        _ input: DescribeImagesRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<DescribeImagesRequest, DescribeImagesResponse> {
        return .init(
            input: input,
            command: self.describeImages,
            inputKey: \DescribeImagesRequest.nextToken,
            outputKey: \DescribeImagesResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``describeImages(_:logger:)``.
    ///
    /// - Parameters:
    ///   - filter: The filter key and value with which to filter your DescribeImages results.
    ///   - imageIds: The list of image IDs for the requested repository.
    ///   - maxResults: The maximum number of repository results returned by DescribeImages in paginated output. When this parameter is used, DescribeImages only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another DescribeImages request with the returned nextToken value. This value can be between 1 and 1000. If this parameter is not used, then DescribeImages returns up to 100 results and a nextToken value, if applicable. This option cannot be used when you specify images with imageIds.
    ///   - registryId: The Amazon Web Services account ID associated with the registry that contains the repository in which to describe images. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryName: The repository that contains the images to describe.
    ///   - logger: Logger used for logging
    @inlinable
    public func describeImagesPaginator(
        filter: DescribeImagesFilter? = nil,
        imageIds: [ImageIdentifier]? = nil,
        maxResults: Int? = nil,
        registryId: String? = nil,
        repositoryName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<DescribeImagesRequest, DescribeImagesResponse> {
        let input = DescribeImagesRequest(
            filter: filter, 
            imageIds: imageIds, 
            maxResults: maxResults, 
            registryId: registryId, 
            repositoryName: repositoryName
        )
        return self.describeImagesPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``describePullThroughCacheRules(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func describePullThroughCacheRulesPaginator(
        _ input: DescribePullThroughCacheRulesRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<DescribePullThroughCacheRulesRequest, DescribePullThroughCacheRulesResponse> {
        return .init(
            input: input,
            command: self.describePullThroughCacheRules,
            inputKey: \DescribePullThroughCacheRulesRequest.nextToken,
            outputKey: \DescribePullThroughCacheRulesResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``describePullThroughCacheRules(_:logger:)``.
    ///
    /// - Parameters:
    ///   - ecrRepositoryPrefixes: The Amazon ECR repository prefixes associated with the pull through cache rules to return. If no repository prefix value is specified, all pull through cache rules are returned.
    ///   - maxResults: The maximum number of pull through cache rules returned by DescribePullThroughCacheRulesRequest in paginated output. When this parameter is used, DescribePullThroughCacheRulesRequest only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another DescribePullThroughCacheRulesRequest request with the returned nextToken value. This value can be between 1 and 1000. If this parameter is not used, then DescribePullThroughCacheRulesRequest returns up to 100 results and a nextToken value, if applicable.
    ///   - registryId: The Amazon Web Services account ID associated with the registry to return the pull through cache rules for. If you do not specify a registry, the default registry is assumed.
    ///   - logger: Logger used for logging
    @inlinable
    public func describePullThroughCacheRulesPaginator(
        ecrRepositoryPrefixes: [String]? = nil,
        maxResults: Int? = nil,
        registryId: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<DescribePullThroughCacheRulesRequest, DescribePullThroughCacheRulesResponse> {
        let input = DescribePullThroughCacheRulesRequest(
            ecrRepositoryPrefixes: ecrRepositoryPrefixes, 
            maxResults: maxResults, 
            registryId: registryId
        )
        return self.describePullThroughCacheRulesPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``describeRepositories(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func describeRepositoriesPaginator(
        _ input: DescribeRepositoriesRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<DescribeRepositoriesRequest, DescribeRepositoriesResponse> {
        return .init(
            input: input,
            command: self.describeRepositories,
            inputKey: \DescribeRepositoriesRequest.nextToken,
            outputKey: \DescribeRepositoriesResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``describeRepositories(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of repository results returned by DescribeRepositories in paginated output. When this parameter is used, DescribeRepositories only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another DescribeRepositories request with the returned nextToken value. This value can be between 1 and 1000. If this parameter is not used, then DescribeRepositories returns up to 100 results and a nextToken value, if applicable. This option cannot be used when you specify repositories with repositoryNames.
    ///   - registryId: The Amazon Web Services account ID associated with the registry that contains the repositories to be described. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryNames: A list of repositories to describe. If this parameter is omitted, then all repositories in a registry are described.
    ///   - logger: Logger used for logging
    @inlinable
    public func describeRepositoriesPaginator(
        maxResults: Int? = nil,
        registryId: String? = nil,
        repositoryNames: [String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<DescribeRepositoriesRequest, DescribeRepositoriesResponse> {
        let input = DescribeRepositoriesRequest(
            maxResults: maxResults, 
            registryId: registryId, 
            repositoryNames: repositoryNames
        )
        return self.describeRepositoriesPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``describeRepositoryCreationTemplates(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func describeRepositoryCreationTemplatesPaginator(
        _ input: DescribeRepositoryCreationTemplatesRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<DescribeRepositoryCreationTemplatesRequest, DescribeRepositoryCreationTemplatesResponse> {
        return .init(
            input: input,
            command: self.describeRepositoryCreationTemplates,
            inputKey: \DescribeRepositoryCreationTemplatesRequest.nextToken,
            outputKey: \DescribeRepositoryCreationTemplatesResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``describeRepositoryCreationTemplates(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of repository results returned by DescribeRepositoryCreationTemplatesRequest in paginated output. When this parameter is used, DescribeRepositoryCreationTemplatesRequest only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another DescribeRepositoryCreationTemplatesRequest request with the returned nextToken value. This value can be between 1 and 1000. If this parameter is not used, then DescribeRepositoryCreationTemplatesRequest returns up to 100 results and a nextToken value, if applicable.
    ///   - prefixes: The repository namespace prefixes associated with the repository creation templates to describe. If this value is not specified, all repository creation templates are returned.
    ///   - logger: Logger used for logging
    @inlinable
    public func describeRepositoryCreationTemplatesPaginator(
        maxResults: Int? = nil,
        prefixes: [String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<DescribeRepositoryCreationTemplatesRequest, DescribeRepositoryCreationTemplatesResponse> {
        let input = DescribeRepositoryCreationTemplatesRequest(
            maxResults: maxResults, 
            prefixes: prefixes
        )
        return self.describeRepositoryCreationTemplatesPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``getLifecyclePolicyPreview(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func getLifecyclePolicyPreviewPaginator(
        _ input: GetLifecyclePolicyPreviewRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<GetLifecyclePolicyPreviewRequest, GetLifecyclePolicyPreviewResponse> {
        return .init(
            input: input,
            command: self.getLifecyclePolicyPreview,
            inputKey: \GetLifecyclePolicyPreviewRequest.nextToken,
            outputKey: \GetLifecyclePolicyPreviewResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``getLifecyclePolicyPreview(_:logger:)``.
    ///
    /// - Parameters:
    ///   - filter: An optional parameter that filters results based on image tag status and all tags, if tagged.
    ///   - imageIds: The list of imageIDs to be included.
    ///   - maxResults: The maximum number of repository results returned by GetLifecyclePolicyPreviewRequest in  paginated output. When this parameter is used, GetLifecyclePolicyPreviewRequest only returns  maxResults results in a single page along with a nextToken  response element. The remaining results of the initial request can be seen by sending  another GetLifecyclePolicyPreviewRequest request with the returned nextToken  value. This value can be between 1 and 100. If this  parameter is not used, then GetLifecyclePolicyPreviewRequest returns up to 100 results and a nextToken value, if  applicable. This option cannot be used when you specify images with imageIds.
    ///   - registryId: The Amazon Web Services account ID associated with the registry that contains the repository. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryName: The name of the repository.
    ///   - logger: Logger used for logging
    @inlinable
    public func getLifecyclePolicyPreviewPaginator(
        filter: LifecyclePolicyPreviewFilter? = nil,
        imageIds: [ImageIdentifier]? = nil,
        maxResults: Int? = nil,
        registryId: String? = nil,
        repositoryName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<GetLifecyclePolicyPreviewRequest, GetLifecyclePolicyPreviewResponse> {
        let input = GetLifecyclePolicyPreviewRequest(
            filter: filter, 
            imageIds: imageIds, 
            maxResults: maxResults, 
            registryId: registryId, 
            repositoryName: repositoryName
        )
        return self.getLifecyclePolicyPreviewPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listImages(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listImagesPaginator(
        _ input: ListImagesRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListImagesRequest, ListImagesResponse> {
        return .init(
            input: input,
            command: self.listImages,
            inputKey: \ListImagesRequest.nextToken,
            outputKey: \ListImagesResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listImages(_:logger:)``.
    ///
    /// - Parameters:
    ///   - filter: The filter key and value with which to filter your ListImages results.
    ///   - maxResults: The maximum number of image results returned by ListImages in paginated output. When this parameter is used, ListImages only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another ListImages request with the returned nextToken value. This value can be between 1 and 1000. If this parameter is not used, then ListImages returns up to 100 results and a nextToken value, if applicable.
    ///   - registryId: The Amazon Web Services account ID associated with the registry that contains the repository in which to list images. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryName: The repository with image IDs to be listed.
    ///   - logger: Logger used for logging
    @inlinable
    public func listImagesPaginator(
        filter: ListImagesFilter? = nil,
        maxResults: Int? = nil,
        registryId: String? = nil,
        repositoryName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListImagesRequest, ListImagesResponse> {
        let input = ListImagesRequest(
            filter: filter, 
            maxResults: maxResults, 
            registryId: registryId, 
            repositoryName: repositoryName
        )
        return self.listImagesPaginator(input, logger: logger)
    }
}

extension ECR.DescribeImageScanFindingsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ECR.DescribeImageScanFindingsRequest {
        return .init(
            imageId: self.imageId,
            maxResults: self.maxResults,
            nextToken: token,
            registryId: self.registryId,
            repositoryName: self.repositoryName
        )
    }
}

extension ECR.DescribeImagesRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ECR.DescribeImagesRequest {
        return .init(
            filter: self.filter,
            imageIds: self.imageIds,
            maxResults: self.maxResults,
            nextToken: token,
            registryId: self.registryId,
            repositoryName: self.repositoryName
        )
    }
}

extension ECR.DescribePullThroughCacheRulesRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ECR.DescribePullThroughCacheRulesRequest {
        return .init(
            ecrRepositoryPrefixes: self.ecrRepositoryPrefixes,
            maxResults: self.maxResults,
            nextToken: token,
            registryId: self.registryId
        )
    }
}

extension ECR.DescribeRepositoriesRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ECR.DescribeRepositoriesRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token,
            registryId: self.registryId,
            repositoryNames: self.repositoryNames
        )
    }
}

extension ECR.DescribeRepositoryCreationTemplatesRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ECR.DescribeRepositoryCreationTemplatesRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token,
            prefixes: self.prefixes
        )
    }
}

extension ECR.GetLifecyclePolicyPreviewRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ECR.GetLifecyclePolicyPreviewRequest {
        return .init(
            filter: self.filter,
            imageIds: self.imageIds,
            maxResults: self.maxResults,
            nextToken: token,
            registryId: self.registryId,
            repositoryName: self.repositoryName
        )
    }
}

extension ECR.ListImagesRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> ECR.ListImagesRequest {
        return .init(
            filter: self.filter,
            maxResults: self.maxResults,
            nextToken: token,
            registryId: self.registryId,
            repositoryName: self.repositoryName
        )
    }
}

// MARK: Waiters

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension ECR {
    /// Waiter for operation ``describeImageScanFindings(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func waitUntilImageScanComplete(
        _ input: DescribeImageScanFindingsRequest,
        maxWaitTime: TimeAmount? = nil,
        logger: Logger = AWSClient.loggingDisabled
    ) async throws {
        let waiter = AWSClient.Waiter<DescribeImageScanFindingsRequest, _>(
            acceptors: [
                .init(state: .success, matcher: try! JMESPathMatcher("imageScanStatus.status", expected: "COMPLETE")),
                .init(state: .failure, matcher: try! JMESPathMatcher("imageScanStatus.status", expected: "FAILED")),
            ],
            minDelayTime: .seconds(5),
            command: self.describeImageScanFindings
        )
        return try await self.client.waitUntil(input, waiter: waiter, maxWaitTime: maxWaitTime, logger: logger)
    }
    /// Waiter for operation ``describeImageScanFindings(_:logger:)``.
    ///
    /// - Parameters:
    ///   - imageId: 
    ///   - maxResults: The maximum number of image scan results returned by DescribeImageScanFindings in paginated output. When this parameter is used, DescribeImageScanFindings only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another DescribeImageScanFindings request with the returned nextToken value. This value can be between 1 and 1000. If this parameter is not used, then DescribeImageScanFindings returns up to 100 results and a nextToken value, if applicable.
    ///   - nextToken: The nextToken value returned from a previous paginated DescribeImageScanFindings request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return.
    ///   - registryId: The Amazon Web Services account ID associated with the registry that contains the repository in which to describe the image scan findings for. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryName: The repository for the image for which to describe the scan findings.
    ///   - logger: Logger used for logging
    @inlinable
    public func waitUntilImageScanComplete(
        imageId: ImageIdentifier,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        registryId: String? = nil,
        repositoryName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DescribeImageScanFindingsRequest(
            imageId: imageId, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            registryId: registryId, 
            repositoryName: repositoryName
        )
        try await self.waitUntilImageScanComplete(input, logger: logger)
    }

    /// Waiter for operation ``getLifecyclePolicyPreview(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func waitUntilLifecyclePolicyPreviewComplete(
        _ input: GetLifecyclePolicyPreviewRequest,
        maxWaitTime: TimeAmount? = nil,
        logger: Logger = AWSClient.loggingDisabled
    ) async throws {
        let waiter = AWSClient.Waiter<GetLifecyclePolicyPreviewRequest, _>(
            acceptors: [
                .init(state: .success, matcher: try! JMESPathMatcher("status", expected: "COMPLETE")),
                .init(state: .failure, matcher: try! JMESPathMatcher("status", expected: "FAILED")),
            ],
            minDelayTime: .seconds(5),
            command: self.getLifecyclePolicyPreview
        )
        return try await self.client.waitUntil(input, waiter: waiter, maxWaitTime: maxWaitTime, logger: logger)
    }
    /// Waiter for operation ``getLifecyclePolicyPreview(_:logger:)``.
    ///
    /// - Parameters:
    ///   - filter: An optional parameter that filters results based on image tag status and all tags, if tagged.
    ///   - imageIds: The list of imageIDs to be included.
    ///   - maxResults: The maximum number of repository results returned by GetLifecyclePolicyPreviewRequest in  paginated output. When this parameter is used, GetLifecyclePolicyPreviewRequest only returns  maxResults results in a single page along with a nextToken  response element. The remaining results of the initial request can be seen by sending  another GetLifecyclePolicyPreviewRequest request with the returned nextToken  value. This value can be between 1 and 100. If this  parameter is not used, then GetLifecyclePolicyPreviewRequest returns up to 100 results and a nextToken value, if  applicable. This option cannot be used when you specify images with imageIds.
    ///   - nextToken: The nextToken value returned from a previous paginated  GetLifecyclePolicyPreviewRequest request where maxResults was used and the  results exceeded the value of that parameter. Pagination continues from the end of the  previous results that returned the nextToken value. This value is  null when there are no more results to return. This option cannot be used when you specify images with imageIds.
    ///   - registryId: The Amazon Web Services account ID associated with the registry that contains the repository. If you do not specify a registry, the default registry is assumed.
    ///   - repositoryName: The name of the repository.
    ///   - logger: Logger used for logging
    @inlinable
    public func waitUntilLifecyclePolicyPreviewComplete(
        filter: LifecyclePolicyPreviewFilter? = nil,
        imageIds: [ImageIdentifier]? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        registryId: String? = nil,
        repositoryName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = GetLifecyclePolicyPreviewRequest(
            filter: filter, 
            imageIds: imageIds, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            registryId: registryId, 
            repositoryName: repositoryName
        )
        try await self.waitUntilLifecyclePolicyPreviewComplete(input, logger: logger)
    }
}
